﻿using PSE.Framework.Communication.Configuration.Adapters;
using System.Configuration;
using System.ComponentModel;
using System;
namespace PSE.Framework.Communication.Configuration.Adapters.File.ExcelFile
{
    public class ExcelFileOutputAdapterActionConfiguration : StreamOutputAdapterActionConfiguration
    {
        [ConfigurationProperty("serializedMessageFile", IsRequired = false)]
        public string SerializedMessageFile
        {
            get
            {
                return CommunicationConfigurationManager.GetFullPath((string)base["serializedMessageFile"]);
            }
        }

        [ConfigurationProperty("serializedMessageType", IsRequired = true)]
        [TypeConverter(typeof(TypeNameConverter))]
        public Type SerializedMessageType
        {
            get
            {
                return (Type)this["serializedMessageType"];
            }
            set
            {
                this["serializedMessageType"] = value;
            }
        }
    }
}
